1. Field of the Invention
The present invention relates to an image processing apparatus, an image processing method and a computer program and, in particular, to an image processing apparatus, an image processing method and a computer program for permitting quick startup in an apparatus and effectively using in the apparatus a recording medium as a resource having a predetermined recording capacity.
2. Description of the Related Art
A file system for use in management of data to be recorded on a recording medium is mounted in computer operating systems. The file system accesses data chunks arranged by a sector (a recording unit of 512 bytes) on the recording medium typically supplied in an auxiliary recording device. The file system forms files and directories using a group of sectors. Information indicating which sector is managed by which file and which sectors remain unused is managed by the file system.
In the file system, a file name is mapped to a recording unit such as sector by an index (such as an index in a file allocation table). The index is managed as in FAT of a file system of MS-DOS (Registered Trademark) or as in inode in UNIX (Registered Trademark) file system.
The file allocation table contains information regarding which sector is managed by which file and which sectors remain unused. In a process such as data recording or data deletion to a recording medium, the file allocation table is correctly updated. The recording medium is thus effectively utilized in computer processing.
In the file system, data reading or data writing is performed by performing processes such as system calls “open,” “read,” “write,” and “close.”
A data write process through the file system is performed by caching data on a main memory of a computer. Data cached on the main memory is later written on a hard disk drive (HDD). In the process of the file system, the file allocation table relating to information of used sectors is updated in accordance with an amount data to be written, and is transferred to a recording medium such as the HDD at a data speed of a bus as a background job. When a system call “close” process in the file system is completed, all data cached is written on the recording medium such as the HDD. The data write process is thus completed.
In this way, time to write data onto the recording medium such as the HDD is hidden from users and response time is shortened. Data rate on the HDD is typically slower than data rate to the main memory.
When the computer is switched off prior to the end of the system call “close” process, data cached on the main memory is missing without being fully written on the HDD. The information regarding the used sectors in the file allocation table is updated, and a sector actually not used can be recognized as an actually used sector.
If the computer is repeatedly switched off prior to the end of the system call “close” process, the available memory capacity of the recording medium appears to be reduced although the amount of data recorded on the recording medium does not increase.
Available programs recovers information of sectors used in the file allocation table so that information regarding the actually used sectors is consistent with information regarding the sectors used in the file allocation table.
Japanese Unexamined Patent Application Publication No. 2003-022663 discloses another technique for producing, searching and reading a file at a fast speed. In accordance with the disclosure, an empty area formed of at least one unit area is found in an information recording medium, a header address of the found empty area is acquired. The acquired header address is attached to data as identification information of the data. The data is thus managed with the identification information mapped thereto.